@extends('layouts.app')
@section('title', '消息通知')
@section('content')
    <div class="fix-top-bar"></div>
    <div class="container main-container m-t-100">
        @if (session('status'))
            <div class="alert alert-success">
                <a href="#" class="close" data-dismiss="alert">&times;</a>
                <strong>通知：</strong>{{session('status')}}
            </div>
        @endif
        <div class="panel panel-success font">
            <div class="panel-heading">
                我的提醒
            </div>
            <div class="panel-body remove-padding-horizontal p-b-0 nof">
                @if (count($notifications) == 0)
                    <div class="empty-block">还未收到提醒!</div>
                @else
                    <ul class="list-group row m-b-0">
                        @foreach($notifications as  $notification)
                        <li class="list-group-item media no-r border-none">
                            <div class="avatar pull-left p-0">
                                <a href="{{route('users.show', $notification->formUser->id)}}">
                                    <img class="media-object img-thumbnail avatar p-0" alt="LinHan" src="{{cdn($notification->formUser->profile)}}"  style="width: 48px;height: 48px">
                                </a>
                            </div>
                            <div class="infos">
                                <div class="media-heading">
                                    <a href="{{route('users.show', $notification->formUser->id)}}">
                                        {{$notification->formUser->name or  ''}}
                                    </a>
                                    •
                                    在主题中提及你:
                                    <a href="{{route('topic', $notification->topic->id)}}#reply{{$notification->replie->index or 0}}">
                                        {{$notification->topic->title or ''}}
                                    </a>
                                    <span class="meta">
                                     • 于 • <span class="timeago popover-with-html" data-content="{{$notification->created_at or ''}}" data-original-title="" title="">{{dateTimeC($notification->created_at)}}前</span>
                                </span>
                                </div>
                                <div class="media-body markdown-reply content-body">
                                    {{toMakeed_Html($notification->replie->body)}}
                                </div>

                            </div>
                            <hr class="m-t-20 m-b-0">
                        </li>
                        @endforeach
                    </ul>
                    @endif
            </div>
        </div>
    </div>
    <div class="navbar-fixed-bottom" style="background-color:  white">
        @include('include.bottom.info')
    </div>
@endsection

@section('js')
    <script>
        $(document).ready(function () {
            $('body').css("background-color", "whitesmoke");
        });
    </script>
@endsection